package com.yellowpage.alarm.data;

import static javax.persistence.GenerationType.SEQUENCE;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * 告警信息表POJO
 * 
 * @author 黄敏华
 * 
 */
@Entity
@Table(name = "CA_ALARMINFO")
public class AlarmInfo implements java.io.Serializable {
	// Sequence生成的主键
	private Long id;
	private String alarmType;
	private String alarmLevel;
	private String cause;
	private String status;
	private String informType;
	private Date createTime;
	private Date confirmTime;
	private Date recoverTime;
	private String recoverDesc;
	private Long thresholdTimes;
	private Long notifyTimes;
	private Long lastUpdateUser;

	public AlarmInfo() {
	}

	public AlarmInfo(String alarmType, String alarmLevel, String cause,
			String status, String informType, Date createTime,
			Date confirmTime, Date recoverTime, String recoverDesc,
			Long thresholdTimes, Long notifyTimes, Long lastUpdateUser) {
		this.alarmType = alarmType;
		this.alarmLevel = alarmLevel;
		this.cause = cause;
		this.status = status;
		this.informType = informType;
		this.createTime = createTime;
		this.confirmTime = confirmTime;
		this.recoverTime = recoverTime;
		this.recoverDesc = recoverDesc;
		this.thresholdTimes = thresholdTimes;
		this.notifyTimes = notifyTimes;
		this.lastUpdateUser = lastUpdateUser;
	}

	@GenericGenerator(name = "generator", strategy = "identity")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "ALARM_TYPE", length = 4)
	public String getAlarmType() {
		return alarmType;
	}

	public void setAlarmType(String alarmType) {
		this.alarmType = alarmType;
	}

	@Column(name = "ALARM_LEVEL", length = 2)
	public String getAlarmLevel() {
		return alarmLevel;
	}

	public void setAlarmLevel(String alarmLevel) {
		this.alarmLevel = alarmLevel;
	}

	@Column(name = "CAUSE", length = 1024)
	public String getCause() {
		return cause;
	}

	public void setCause(String cause) {
		this.cause = cause;
	}

	@Column(name = "STATUS", length = 2)
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "INFORM_TYPE", length = 2)
	public String getInformType() {
		return informType;
	}

	public void setInformType(String informType) {
		this.informType = informType;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CONFIRM_TIME")
	public Date getConfirmTime() {
		return confirmTime;
	}

	public void setConfirmTime(Date confirmTime) {
		this.confirmTime = confirmTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "REVOCER_TIME")
	public Date getRecoverTime() {
		return recoverTime;
	}

	public void setRecoverTime(Date recoverTime) {
		this.recoverTime = recoverTime;
	}

	@Column(name = "REVOCER_DESC", length = 1024)
	public String getRecoverDesc() {
		return recoverDesc;
	}

	public void setRecoverDesc(String recoverDesc) {
		this.recoverDesc = recoverDesc;
	}

	@Column(name = "THRESHOLD_TIMES", length = 18)
	public Long getThresholdTimes() {
		return thresholdTimes;
	}

	public void setThresholdTimes(Long thresholdTimes) {
		this.thresholdTimes = thresholdTimes;
	}

	@Column(name = "NOTIFY_TIMES", length = 18)
	public Long getNotifyTimes() {
		return notifyTimes;
	}

	public void setNotifyTimes(Long notifyTimes) {
		this.notifyTimes = notifyTimes;
	}

	@Column(name = "LAST_UPDATE_USER", length = 18)
	public Long getLastUpdateUser() {
		return lastUpdateUser;
	}

	public void setLastUpdateUser(Long lastUpdateUser) {
		this.lastUpdateUser = lastUpdateUser;
	}

}
